import request from '@/utils/request'

// 查询语言对照列表
export function listTranslate(query) {
  return request({
    url: '/video/translate/list',
    method: 'get',
    params: query
  })
}

// 查询语言对照详细
export function getTranslate(id) {
  return request({
    url: '/video/translate/' + id,
    method: 'get'
  })
}

// 新增语言对照
export function addTranslate(data) {
  return request({
    url: '/video/translate',
    method: 'post',
    data: data
  })
}

// 修改语言对照
export function updateTranslate(data) {
  return request({
    url: '/video/translate',
    method: 'put',
    data: data
  })
}

// 删除语言对照
export function delTranslate(id) {
  return request({
    url: '/video/translate/' + id,
    method: 'delete'
  })
}

// 批量插入语言对照
export function batchInsert(data) {
  return request({
    url: '/video/translate/batchInsert',
    method: 'post',
    data: data
  })
}

// 批量翻译
export function batchTranslate(data) {
  return request({
    url: '/video/translate/batchTranslate',
    method: 'post',
    data: data
  })
}

// 查询百度api支持翻译的语种
export function listTranslateApi(query) {
  return request({
    url: '/config/api/list',
    method: 'get',
    params: query
  })
}
